package com.itboye.ihomebank.activity.finance;

import android.os.Bundle;
import android.view.Gravity;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.itboye.ihomebank.R;
import com.itboye.ihomebank.base.BaseOtherActivity;

/**
 * Created by Administrator on 2018/6/15 0015.
 */

public class MonthPayActivity extends BaseOtherActivity {
    View v_statusbar;
    ImageView close_icon;
    TextView add_shap_title_tv;// 标题
    RelativeLayout rl;
    ImageView imgBg,searchHouse;
    @Override
    protected int layout_id() {
        return R.layout.activity_monthpay;
    }

    @Override
    protected void onInitController() {

    }

    @Override
    protected void onInit() {
        setStatusBarHeight(v_statusbar);
        add_shap_title_tv.setText("住家月付");

    }


    @Override
    public void onWindowFocusChanged(boolean hasFocus) {
        super.onWindowFocusChanged(hasFocus);
        int height = imgBg.getHeight();

        RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT,RelativeLayout.LayoutParams.WRAP_CONTENT);
        params.setMargins(0,height*10/25,0,0);
        params.addRule(RelativeLayout.CENTER_HORIZONTAL);
        searchHouse.setLayoutParams(params);
//        mWidth = mTextView.getWidth();
//        mHeight = mTextView.getHeight();
//        Log.d(TAG, "onWindowFocusChanged: width = " + mWidth + "   height = " + mHeight);
    }
    @Override
    protected void onReadIntent(Bundle bundle) {

    }

    @Override
    public void onClick(View v) {
        super.onClick(v);
        switch (v.getId()){
            case R.id.close_icon:
                finish();
                break;
            case R.id.searchHouse:
                this.finish();
                break;
        }
    }
}
